<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
<head th:replace="~{segmentation/_right_bottom_header::_header_common(~{::title},~{::link},~{::style})}">
    <meta charset="utf-8">
    <title>用户查看</title>
    <link>
    <style type="text/css"></style>
</head>
<body>
<div class="layuimini-container">
    <div class="layuimini-main">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
            <legend>用户查看</legend>
        </fieldset>
        <form class="layui-form" id="userFormEdit" action="">
            <input type="hidden" id="id" name="id" th:value="${p.id}"/>
            <div class="layui-form-item" pane="">
                <label class="layui-form-label">帐号</label>
                <div class="layui-input-block">
                    <span class="view-span" th:text="${p.account}"></span>
                </div>
            </div>
            <div class="layui-form-item" pane="">
                <label class="layui-form-label">姓名</label>
                <div class="layui-input-block">
                    <span class="view-span" th:text="${p.name}"></span>
                </div>
            </div>
            <div class="layui-form-item" pane="">
                <label class="layui-form-label">电话</label>
                <div class="layui-input-block">
                    <span class="view-span" th:text="${p.phone}"></span>
                </div>
            </div>
            <div class="layui-form-item" pane="">
                <label class="layui-form-label">邮箱</label>
                <div class="layui-input-block">
                    <span class="view-span" th:text="${p.email}"></span>
                </div>
            </div>
            <div class="layui-form-item" pane="">
                <label class="layui-form-label">启用状态</label>
                <div class="layui-input-block">
                     <span class="view-span" th:each="item : ${@typeServiceImpl.findByParentCodeList('enableStatus')}"
                           th:text="${item.typeName}"
                           th:if="${p.enableStatus == item.typeValue}"
                           th:style="${item.typeValue == 1 ? 'color: limegreen;' : 'color: red;' }"></span>
                </div>
            </div>
            <div class="layui-form-item" pane="">
                <label class="layui-form-label">级别</label>
                <div class="layui-input-block">
                    <span class="view-span" th:text="${p.userLevel}"></span>
                </div>
            </div>
<!--            <div class="layui-form-item" pane="">-->
<!--                <label class="layui-form-label">是否锁住-->
<!--                </label>-->
<!--                <div class="layui-input-block">-->
<!--                    <span class="view-span" th:if="${p.accountLocked == 2}">是</span>-->
<!--                    <span class="view-span" th:if="${p.accountLocked == 1}">否</span>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="layui-form-item" pane="">-->
<!--                <label class="layui-form-label">帐号是否过期-->
<!--                </label>-->
<!--                <div class="layui-input-block">-->
<!--                    <span class="view-span" th:if="${p.accountExpired == 2}">是</span>-->
<!--                    <span class="view-span" th:if="${p.accountExpired == 1}">否</span>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="layui-form-item" pane="">-->
<!--                <label class="layui-form-label">凭证是否过期-->
<!--                </label>-->
<!--                <div class="layui-input-block">-->
<!--                    <span class="view-span" th:if="${p.credentialsExpired == 2}">是</span>-->
<!--                    <span class="view-span" th:if="${p.credentialsExpired == 1}">否</span>-->
<!--                </div>-->
<!--            </div>-->
            <div class="layui-form-item" pane="">
                <label class="layui-form-label">描述</label>
                <div class="layui-input-block">
                    <span class="view-span" th:text="${p.description}"></span>
                </div>
            </div>
            <div class="layui-form-item" pane="">
                <label class="layui-form-label">创建人</label>
                <div class="layui-input-block">
                    <span class="view-span" th:text="${p.createUserName}"></span>
                </div>
            </div>
            <div class="layui-form-item" pane="">
                <label class="layui-form-label">创建时间</label>
                <div class="layui-input-block">
                    <span class="view-span" th:text="${#dates.format(p.createTime, 'yyyy-MM-dd HH:mm:ss')}"></span>
                </div>
            </div>
            <div class="layui-form-item" pane="">
                <label class="layui-form-label">操作人</label>
                <div class="layui-input-block">
                    <span class="view-span" th:text="${p.operaterUserName}"></span>
                </div>
            </div>
            <div class="layui-form-item" pane="">
                <label class="layui-form-label">操作时间</label>
                <div class="layui-input-block">
                    <span class="view-span" th:text=" ${#dates.format(p.operaterTime, 'yyyy-MM-dd HH:mm:ss')}"></span>
                </div>
            </div>
            <div class="layui-form-item" pane="">
                <label class="layui-form-label">操作状态</label>
                <div class="layui-input-block">
                    <span class="view-span" th:each="item : ${@typeServiceImpl.findByParentCodeList('operaterStatus')}"
                          th:text="${item.typeName}"
                          th:if="${p.operaterStatus + '' == item.typeCode}" ></span>
                </div>
            </div>
        </form>
    </div>
</div>
</body>
</html>